<extend name="Public/base"/>

<block name="sidebar">

    <include file="plus-nav-top" />

</block>


<block name="body">

    <form class="well form-inline " method="get" action="{:U('')}">
        <div class="form-group">
            <input type="text" class="input-medium" name="keyword" value="{$keyword}" placeholder="请输入会员卡">



            <select name="type">
                <option value=""> 类别</option>
                <volist name=":F('Group')" id="vo" >

                    <php>$selected=(I("get.type")==$vo["id"])?"selected":"";</php>
                    <option value="{$vo.id   }" {$selected}>{$vo.name}</option>
                </volist>
            </select>
            <select name="is_use">
                <option value=""> 全部</option>
                <option value="1"> 使用过</option>
                <option value="2"> 未使用</option>


            </select>
        </div>
        <div class="form-group">
            <button class="btn btn-xs btn-info" data-toggle="tooltip" title="搜索"><i class="icon-search bigger-110"></i>
            </button>
            <if condition="$search"><a data-toggle="tooltip" title="清除搜索项" href="{:U(db_list)}"
                                       class="tooltip-danger btn btn-xs btn-danger"><i
                    class="icon-remove bigger-110"></i></a></if>
        </div>
    </form>

    <form class="J_ajaxForm" action="{:U('')}" method="post">

        <div class="table_list">
            <table width="100%" class="table table-hover">
                <thead>
                <tr>
                    <th width="16"><label><input type="checkbox" class="check-all"></label></th>
                    <th width="50">ID</th>
                    <th>编号</th>

                    <th>类型</th>
                    <th>初始金额</th>
                    <th>状态</th>

                </tr>
                </thead>
                <tbody>

                <foreach name="list" item="vo">
                    <tr>

                        <td>
                            <if condition="!$vo[is_use]">
                                <input type="checkbox" class="ids" name="ids[]" value="{$vo.id}"></if>


                        </td>
                        <td>{$vo.id}</td>
                        <td>{$vo.title}</td>

                        <td>{:F("Group")[$vo["type"]][name]}</td>
                        <td>{$vo.money}</td>


                        <td>  <if condition="$vo['is_use'] eq 1">
                           已使用
                            <else/>
                            未使用
                        </if></td>




                    </tr>
                </foreach>


                </tbody>
            </table>
        </div>
        <div class="pagination">{$Page}</div>
        <div class="form-actions">


            <button class="btn btn-primary ajax-post confirm" type="submit" url="{:U('delete')}"
                    target-form="J_ajaxForm" data-title="你确定删除吗？">删除
            </button>

        </div>
    </form>

</block>
<block name="plugin-script">
    <script src="__JS__/content.js"></script>

</block>

